<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
	int temp = 0; 
		if(request.getParameter("su1").equals(null) || request.getParameter("su1").equals("")){
			%>
			<script>
				alert("첫번째 빈칸에 값을 입력해 주십시오.");
				history.go(-1);		
			</script>
		<%}
		else if(request.getParameter("su1").equals(null) && request.getParameter("su1").equals("")){
			%>
			<script>
				alert("첫번째 빈칸에 값을 입력해 주십시오.");
				history.go(-1);		
			</script>
		<%}	
		else if(request.getParameter("su2").equals(null) && request.getParameter("su2").equals("")){
			%>
			<script>
				alert("두번째 빈칸에 값을 입력해 주십시오.");
				history.go(-1);		
			</script>
		<%}	
		else if(request.getParameter("su2").equals(null) || request.getParameter("su2").equals("")){
			%>
			<script>
				alert("두번째 빈칸에 값을 입력해 주십시오.");
				history.go(-1);		
			</script>
		<%}	
		else{
			int su1 = Integer.parseInt(request.getParameter("su1"));
			int su2 = Integer.parseInt(request.getParameter("su2"));
			if(su1>su2){
				temp = su1;
				su1 = su2;
				su2 = temp;
			}
			for(int a=su1; a<=su2; a++){
				if(a%3==0){
					out.println(a+"\n");
				}
			}
		}

%>		
</body>
</html>
